'''
Created on 31/01/2010

@author: joger
'''

import wx

from comun import mensageError as msje, mensageAlerta as msja
from imagenes import images

class VistaFirmas(wx.Panel):
    '''
    classdocs
    '''

    def __init__(self,ventanaMadre):
        '''
        Constructor
        '''
        self.msje = msje
        self.msja = msja
        self.parent = ventanaMadre.parent
        self.ventanaHija = None
        wx.Panel.__init__(self, ventanaMadre, -1)
        self.SetAutoLayout(True)
    
    def tool(self):
        
        self.parent.tb.ClearTools()
        self.parent.tb.AddSeparator()
        self.parent.tb.AddLabelTool(10, "", images.getFileNew32Bitmap(), shortHelp="Crear Clave")#longHelp="Long help for 'New'"
        self.parent.tb.AddLabelTool(20, "", images.getFileOpen32Bitmap(), shortHelp="Importar")
        self.parent.tb.AddLabelTool(30, "", images.getFileSave32Bitmap(), shortHelp="Exportar")
        self.parent.tb.AddLabelTool(40, "", images.getFileClose32Bitmap(),shortHelp="Eliminar")
        self.parent.tb.AddLabelTool(50, "", images.getEditEntry32Bitmap(),shortHelp="Listar")
        self.parent.tb.AddSeparator()
        #self.parent.tb.AddLabelTool(60, "", images.getDeleteGroup32Bitmap(),shortHelp="Firmar")
        #self.parent.tb.AddLabelTool(70, "", images.getDeleteGroup32Bitmap(),shortHelp="Verificar")
        #self.parent.tb.AddLabelTool(80, "", images.getDeleteGroup32Bitmap(),shortHelp="Cifrar")
        #self.parent.tb.AddLabelTool(90, "", images.getDeleteGroup32Bitmap(),shortHelp="Descifrar")
        #self.parent.tb.AddSeparator()
    
    def menu(self):
        
        self.itemsMenuClaves = wx.Menu()
        #Item 1
        item = wx.MenuItem(self.itemsMenuClaves, 500, "C&rear Clave\tCtrl+R", "")        
        item.SetBitmap(images.getFileNew32Bitmap())
        self.itemsMenuClaves.AppendItem(item)
        #Item 2
        item = wx.MenuItem(self.itemsMenuClaves, 501, "&Importar Claves\tCtrl+I", "")
        item.SetBitmap(images.getFileOpen32Bitmap())
        self.itemsMenuClaves.AppendItem(item)
        #Item 3
        item = wx.MenuItem(self.itemsMenuClaves, 502, "&Exportar Claves\tCtrl+E", "")
        item.SetBitmap(images.getFileClose32Bitmap())
        self.itemsMenuClaves.AppendItem(item)
        #Item 4
        item = wx.MenuItem(self.itemsMenuClaves, 503, "El&iminar Claves\tCtrl+I", "")
        item.SetBitmap(images.getDeleteGroup32Bitmap())
        self.itemsMenuClaves.AppendItem(item)
        #Item 5
        item = wx.MenuItem(self.itemsMenuClaves, 504, "&Listar Claves\tCtrl+L", "")
        item.SetBitmap(images.getDeleteGroup32Bitmap())
        self.itemsMenuClaves.AppendItem(item)
        
        self.parent.MiMenuBar.Append(self.itemsMenuClaves,"&Claves")
        ######
        
        
        self.itemsMenuFirmas = wx.Menu()
        #Item 1
        item = wx.MenuItem(self.itemsMenuFirmas, 505, "Fir&mar\tCtrl+M", "")        
        item.SetBitmap(images.getFileNew32Bitmap())
        self.itemsMenuFirmas.AppendItem(item)
        #Item 2
        item = wx.MenuItem(self.itemsMenuFirmas, 506, "&Verificar\tCtrl+V", "")        
        item.SetBitmap(images.getFileNew32Bitmap())
        self.itemsMenuFirmas.AppendItem(item)
        
        self.parent.MiMenuBar.Append(self.itemsMenuFirmas,"&Firmas")
        #####
        
        self.itemsMenuCifrado = wx.Menu()
        #Item 1
        item = wx.MenuItem(self.itemsMenuCifrado, 507, "Ci&frar\tCtrl+F", "")        
        item.SetBitmap(images.getFileNew32Bitmap())
        self.itemsMenuCifrado.AppendItem(item)
        #Item 2
        item = wx.MenuItem(self.itemsMenuCifrado, 508, "&Desci&frar\tCtrl+D", "")        
        item.SetBitmap(images.getFileNew32Bitmap())
        self.itemsMenuCifrado.AppendItem(item)
        
        self.parent.MiMenuBar.Append(self.itemsMenuCifrado,"Cifrad&o")